<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* *{
            background: red;
        } */
        /* h1{
            color: red;
        } */
        /* #aa{
            color: red;
        } */
       
        .dd{
            background: gray;
            color: green;
        }
        #ee{
            color: blue;
        }
        #ul2.cc{
            color: red;
        }
        #div1 .div2{
            color: red;
            /* border: 1px solid #000; */
        }
        #div2 > div{
            border: 1px solid #000;
        }

        [id=aa]{
            color: red;
        }

        a:hover{
            color: red;
            font-size: 48px;
        }

        /* #div1:first-child{

            border: 2px solid #000;
        } */

        #div1 :nth-child(2n){
            color: red;
        }

        /* #div1 p:nth-of-type(1){
            color: red;
        } */

        #ul1::after{
            content: 'haha';
            background: #f00;
            width: 200px;
            height: 100px;
            display: block;
        }

    </style>
</head>
<body>
    <!-- <h1 id="aa">这是标题</h1>
    <h1 id="bb">这是另一个标题</h1>
    <ul id="ul1">
        <li class="dd cc">item 1</li>
        <li id="ee" class="cc">item 2</li>
        <li>item 3</li>
    </ul>

    <ul id="ul2" class="cc">
        <li class="cc">001</li>
        <li class="cc">002</li>
        <li>003</li>
    </ul>

    <div id="div1" class="div2">
        div1
        <div class="div2">div2</div>
    </div> 
    
    <div id="div2">
        <div>
            这是div2的子代
            <div>这是div2的孙子代</div>
        </div>
    </div> -->

    <!-- <p id="aa">这是一个段落</p>
    <p id="bb">这是另一个段落</p>
    <p>这是第三一个段落</p> -->

    <!-- <a href="#">这是链接</a> -->

   <div id="div1">
       <h1>h1</h1>
       <p>item1</p>
       <p>item2</p>
       <p>item3</p>
       <p>item4</p>
   </div>

   <ul id="ul1">
       <li>item1</li>
       <li>item2</li>
   </ul>

</body>
</html>